#ifndef CONFIGDATA_H
#define CONFIGDATA_H

#include "shareheader.h"

class ConfigData
{
public:
    ConfigData();
    ~ConfigData();
    void Initialize();

    // tran setting
    void setTranSetting(int tranType, const TTranSetting& setting);
    TTranSetting getTranSetting(int tranType);

    // gen setting
    void setGenConfig(int genId, const TGenConfig& config);
    TGenConfig getGenConfig(int genId);
    int addGen(std::string ip = "", int userCount = 0);
    void delGen(int genId);

    // duration setting
    void setDuration(int duration);
    int getDuration();
    void setIncUser(int user);
    int getIncUser();
    void setIncTime(int sec);
    int getIncTime();

private:
    TTranSetting *m_tranList;
    int m_duration;
    int m_incUser;
    int m_incTime; // in secs
    TGenConfig *m_genList;
};

#endif // CONFIGDATA_H
